package com.abhinav.designPatterns.visitor;

import java.util.ArrayList;
import java.util.Iterator;

public class CustomerGroup {
	private ArrayList<Customer> customers = new ArrayList<Customer>();

	public void accept(IVisitor visitor) {
		for (Iterator<Customer> it = customers.iterator(); it.hasNext();) {
			it.next().accept(visitor);
		}
	}

	public void addCustomer(Customer customer) {
		customers.add(customer);
	}
}
